package com.ruoyi.project.purchase.mapper;

import com.ruoyi.project.purchase.domain.Purchase;
import com.ruoyi.project.purchase.domain.Supplier;
import com.ruoyi.project.purchase.domain.VO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

@Mapper
public interface PurchaseMapper {
    @Select("select sup_id supId , sup_name supName from supplier ")
    List<Supplier> findAllSup();

    List<Purchase> findAllPurchase(Purchase purchase);

    Purchase findOnePurchase(String purOrderId);

    String getOnePurchase (VO vo);
    int addPurchase(VO vo);
    int addPurchaseAndStatus(VO vo);
    int updatePurchase(VO vo);
    int updatePurchaseAndStatus(VO vo);

    int changeStatus(String purOrderId);
    int removePur(String purOrderId);
    int ReChange(String purOrderId , String name , Date updateTime);
    int changeOk(String purOrderId);
    int changeNo(String purOrderId);
}
